<template>
  <div>
    <div v-for="item in arr">
      <input type="checkbox" :value="item" v-model="and">
      <span>{{item}}</span>
    </div>
    <p>你选中元素，累加的值和为{{he}}</p>
  </div>
</template>

<script>
export default {
  data () {
    return {
      arr:[9, 15, 19, 25, 29, 31, 48, 57, 62, 79, 87],
      and:[]
    }
  },
  computed:{
    he(){
     return this.and.reduce((item,sum)=>item+=sum,0)
    }
  }
}
</script>

<style>
div{
  display: inline-block;
}
</style>